﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="ManagerTuDiem.aspx.cs" Inherits="Continental.Admin.ManagerTuDiem" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_hor_menu" runat="server">
    <ul>
        <li><a href="Index.aspx"><span><strong>TRANG CHỦ</strong></span></a></li>
        <li><a href="#"><span><strong>QUẢN LÝ SẢN PHẨM</strong></span></a></li>
        <li><a href="ManagerTuDiem.aspx" class="active"><span><strong>QUẢN LÝ TỤ ĐIỂM</strong></span></a></li>
        <li><a href="#"><span><strong>QUẢN LÝ VIỆN ẢNH</strong></span></a></li>
        <li><a href="#"><span><strong>QUẢN LÝ GIẢI TRÍ</strong></span></a></li>
        <li><a href="ManagerUser.aspx"><span><strong>QUẢN LÝ NGƯỜI DÙNG</strong></span></a></li>
        <li><a href="ManagerExtension.aspx"><span><strong>MỞ RỘNG</strong></span></a></li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cph_menu_content" runat="server">
    <ul>
        <li><a href="ManagerTuDiem.aspx" class="active-left-menu">Danh sách Tụ Điểm</a></li>
        <li><a href="ManagerNhomTuDiem.aspx">Quản lý Nhóm Tụ Điểm</a></li>
    </ul>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cph_breadcum" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cph_main_content" runat="server">
    <h4>
        Danh sách Tụ Điểm (<span style="color: Red; font-weight: bold"><%= amountOfTuDiem %></span>):</h4>
    <table style="width: 100%">
        <tr>
            <td>
                Tên tụ điểm
            </td>
            <td>
                <asp:TextBox ID="txtNameForSearch" runat="server" Width="300px"></asp:TextBox>
            </td>
            <td>
                Nhóm Tụ Điểm
            </td>
            <td>
                <asp:DropDownList ID="ddlNhomTuDiemLevel1" runat="server" Width="300px" DataTextField="TitleOrName"
                    DataValueField="NhomID" OnDataBound="ddlNhomTuDiemLevel1_DataBound">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Quận/ Huyện
            </td>
            <td>
                <asp:DropDownList ID="ddlQuanHuyen" runat="server" Width="300px" DataTextField="TitleOrName"
                    DataValueField="QuanHuyenID" AutoPostBack="True" OnDataBound="ddlQuanHuyen_DataBound"
                    OnSelectedIndexChanged="ddlQuanHuyen_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
            <td>
                Đường phố
            </td>
            <td>
                <asp:DropDownList ID="ddlDuongPho" runat="server" Width="300px" DataTextField="TitleOrName"
                    DataValueField="DuongPhoID" OnDataBound="ddlDuongPho_DataBound">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Cờ hiển thị
            </td>
            <td>
                <asp:CheckBox ID="ckDeletedFlag" runat="server" Checked="true" />
            </td>
            <td>
            </td>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" Width="150px" OnClick="btnSearch_Click" />
            </td>
        </tr>
    </table>
    <asp:ListView ID="lvTuDiem" runat="server" GroupPlaceholderID="Group" ItemPlaceholderID="Item"
        GroupItemCount="1">
        <LayoutTemplate>
            <table id="tbl-Coupon">
                <tr>
                    <th>
                        Tên tụ điểm
                    </th>
                    <th>
                        Địa chỉ
                    </th>
                    <th>
                        Số điện thoại
                    </th>
                    <th>
                        Nhóm tụ điểm
                    </th>
                    <th>
                        Ngày tạo
                    </th>
                    <th>
                        Is Vip
                    </th>
                    <th>
                        Điểm sắp xếp
                    </th>
                </tr>
                <asp:PlaceHolder ID="Group" runat="server"></asp:PlaceHolder>
            </table>
        </LayoutTemplate>
        <GroupTemplate>
            <tr>
                <asp:PlaceHolder ID="Item" runat="server"></asp:PlaceHolder>
            </tr>
        </GroupTemplate>
        <ItemTemplate>
            <td>
                <a href='ManagerTuDiemAddNew.aspx?TuDiemID=<%# Eval("TuDiemID") %>'>
                    <%# Eval("TitleOrName")%></a>
            </td>
            <td>
                <%# Eval("Address")%>
            </td>
            <td>
                <%# Eval("MobiPhone")%>
            </td>
            <td>
                <%# Eval("TitleOrNameOfNhom")%>
            </td>
            <td>
                <%# Eval("DateCreated")%>
            </td>
            <td>
                <%# Eval("IsVip")%>
            </td>
            <td>
                <%# Eval("LevelOfRanging")%>
            </td>
        </ItemTemplate>
    </asp:ListView>
    <p>
        <asp:DataPager ID="dpTuDiem" runat="server" PagedControlID="lvTuDiem" PageSize="40"
            OnPreRender="dpTuDiem_PreRender">
            <Fields>
                <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="True" ShowNextPageButton="False"
                    ShowPreviousPageButton="False" />
                <asp:NumericPagerField />
                <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="True" ShowNextPageButton="False"
                    ShowPreviousPageButton="False" />
            </Fields>
        </asp:DataPager>
    </p>
    <div class="command-box">
        <asp:Button ID="btnSave" runat="server" Width="100px" Text="Thêm mới" ValidationGroup="CAPNHAT"
            Font-Bold="true" OnClick="btnSave_Click" />&nbsp;
        <asp:Button ID="btnDelete" runat="server" Text="Xóa" Width="100px" OnClientClick="return confirm('Xác nhận hành động xóa?')"
            Font-Bold="true" OnClick="btnDelete_Click" />
        <asp:Button ID="btnCancel" runat="server" Text="Hủy" Width="100px" Font-Bold="true"
            OnClick="btnCancel_Click" />
    </div>
</asp:Content>
